package gateway.controller;

import gateway.config.BeanDemo;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RestController()
public class TController {

    /*@Bean(initMethod = "init")
    BeanDemo beanDemo() {
        return new BeanDemo();
    }*/

    @GetMapping("/valueM")
    public String value() {
//        HttpHeaders headers = httpRequest.headers();

        log.info("value");
        return "v";
    }

    @PostMapping("/mapJson2")
    public String json(@RequestBody Map<String, Object> req) {
        log.info("req : {}", req);
        return "success";
    }

}
